package cn.cjlmonster.demo02.virtual;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.ArrayList;
import java.util.List;

import cn.cjlmonster.demo02.virtual.dev.GatewayDevice;
import cn.cjlmonster.demo02.virtual.dev.HotPumpDevice;
import cn.cjlmonster.demo02.virtual.dev.NewAirDevice;
import cn.cjlmonster.demo02.virtual.dev.ThermostatDevice;
import cn.cjlmonster.demo02.virtual.dev.ThermostatDevices;
import cn.cjlmonster.demo02.virtual.dev.WaterHeaterDevice;

/**
 * cn.cjlmonster.demo02.virtual
 *
 * @author cjl
 * @project Demo02
 * @date 2022/11/4 23:08
 */
public class DF {

    public static final GatewayDevice gatewayDevice;
    public static final List<HotPumpDevice> hotPumpDevices;
    public static final List<WaterHeaterDevice> waterHeaterDevices;
    public static final List<NewAirDevice> newAirDevices;
    public static final List<ThermostatDevice> thermostatDevices;


    public static final List<MultiItemEntity> deviceList;

    static {
        deviceList = new ArrayList<>();

        gatewayDevice = new GatewayDevice();
        deviceList.add(gatewayDevice);

        hotPumpDevices = new ArrayList<>();
        for (int i = 1; i <= 2; i++) {
            HotPumpDevice device = new HotPumpDevice(i);
            hotPumpDevices.add(device);
            deviceList.add(device);
        }

        waterHeaterDevices = new ArrayList<>();
        for (int i = 1; i <= 36; i++) {
            WaterHeaterDevice device = new WaterHeaterDevice(i);
            waterHeaterDevices.add(device);
            deviceList.add(device);
        }

        newAirDevices = new ArrayList<>();
        for (int i = 1; i <= 36; i++) {
            NewAirDevice device = new NewAirDevice(i);
            newAirDevices.add(device);
            deviceList.add(device);
        }

        thermostatDevices = new ArrayList<>();
        for (int i = 1; i <= 12; i++) {
            ThermostatDevice device = new ThermostatDevice(i);
            thermostatDevices.add(device);
        }

        deviceList.add(new ThermostatDevices(thermostatDevices));
    }
}
